﻿// Copyright (c) egmkang wang. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace XServer.GrainInterfaces
{
    using System.Threading.Tasks;
    using Orleans;
    using Orleans.Concurrency;
    using XServer.Message;

    public interface IPlayerGrain : IGrainWithIntegerKey, ISendMessage
    {
        /// <summary>
        /// 从数据库中加载玩家
        /// </summary>
        /// <returns>TaskDone</returns>
        Task LoadAsync();

        /// <summary>
        /// 获取用户简要信息
        /// </summary>
        /// <returns>简要信息</returns>
        Task<PlayerSimpleInfo> GetSimpleInfo();

        /// <summary>
        /// 获取好友信息
        /// </summary>
        /// <returns>好友信息</returns>
        Task<FriendInfo> GetFrindInfo();

        /// <summary>
        /// 获取他人的信息摘要(可以用来完成比较复杂的逻辑)
        /// </summary>
        /// <returns>摘要信息</returns>
        Task<OtherPlayerInfo> GetOtherPlayerInfo();
    }
}
